import request from '@/utils/request'

export function EnterpriseList(params) {
  return request({
    url: '/park/enterprise',
    method: 'get',
    params
  })
}

export function getIndustryListAPI() {
    return request({
      url: '/park/industry'
    })
  }
  export function createExterpriseAPI(data) {
    return request({
      url: '/park/enterprise',
      method: 'POST',
      data
    })
  }
  export function uploadAPI(data) {
    return request({
      url: '/upload',
      method: 'POST',
      data
    })
  }
  export function expandListAPI(id)
  {
    return request({
      url: `/park/enterprise/rent/${id}`,
      method: 'GET'
    })
  }
  export function getEnterpriseDetailAPI(id) {
    return request({
      url: `/park/enterprise/${id}`
    })
  }

  export function updateExterpriseAPI(data){
    return request({
      url: `/park/enterprise`,
      method: 'PUT',
      data
    })
  }

  export function deleteExterpriseAPI(id){
    return request({
      url: `/park/enterprise/${id}`,
      method: 'DELETE'
    })
  }

  export function getrentbuildListAPI() {
    return request({
      url: '/park/rent/building',
      method: 'GET'
    })
  }

  export function getrentbuildDetailAPI(data) {
    console.log(data)
    return request({
      url: `/park/enterprise/rent/`,
      method: 'post',
      data
    })
  }

export function getreturnDetailAPI(id) {
  return request({
    url: `/park/enterprise/rent/${id}`,
    method: 'put'
  })
}

export function DeleterRentAPI(id) {
  return request({
    url: `/park/enterprise/rent/${id}`,
    method: 'delete'
  })
}
export function getEnterpriseDetail(id) {
  console.log(id)
  return request({
    url: `/park/enterprise/${id}`,
    method: 'GET'
  })
}